import request from '@/utils/request'

const api_name = '/eduservice/commentfront'

export default {
  getPageList(page, limit, targetType, targetId) {
    return request({
      url: `${api_name}/${page}/${limit}`,
      method: 'get',
      params: {targetType, targetId}
    })
  },
  addComment(comment) {
    return request({
      url: `${api_name}/save`,
      method: 'post',
      data: comment
    })
  },
  delComment(id) {
    return request({
      url: `${api_name}/del/${id}`,
      method: 'get'
    })
  }
}
